Skip to content

Handle class object in slot 0 on Emacs 30+ - #11

Closed
srnnkls wants to merge 1 commit into
magit:mainfrom
srnnkls:fix/emacs-v30-closql--abbrev-class-arg-missmatch
Closed

srnnkls wants to merge 1 commit into
magit:mainfrom
srnnkls:fix/emacs-v30-closql--abbrev-class-arg-missmatch

Conversation

@srnnkls

@srnnkls srnnkls commented Dec 8, 2025 •

Copy link
Copy Markdown

Emacs 30+ stores an EIEIO class object in slot 0 instead of a symbol

Emacs 30+ stores an EIEIO class object in slot 0 instead of a symbol.
Convert it to the class name symbol to preserve the expected
representation and maintain compatibility with older Emacs and existing
data.
@tarsius tarsius closed this in 00c8bd0 Dec 8, 2025
@tarsius

tarsius commented Dec 8, 2025

Copy link
Copy Markdown
Member

The first problem was that closql--remake-instance did not honor eieio-backward-compatibility (705f05e).

After fixing that, I also applied a fix similar to yours (00c8bd0) to closql--coerce, since someone might disable the backward compatibility.

Thanks for the report!

I never noticed this issue because apparently neither epkg nor forge feed back an object that was retrieved from the database back into the database. (You should check your code that does that; maybe it shouldn't. Instead of reinserting the object, setting slots likely is enough.)

Ahrgl... I had to post this using the web interface. Apparently respecting eieio-backward-compatibility leads to regressions in forge.

@tarsius

tarsius commented Dec 8, 2025 •

Copy link
Copy Markdown
Member

I've removed these two commits again. It might be a few days until I get back to this.

@srnnkls

srnnkls commented Dec 8, 2025

Copy link
Copy Markdown
Author

Thanks for taking the time to look at this.

I never noticed this issue because apparently neither epkg nor forge feed back an object that was retrieved from the database back into the database. (You should check your code that does that; maybe it shouldn't. Instead of reinserting the object, setting slots likely is enough.)

I noticed this while trying to get code-review working again. Thanks for the suggestion I’ll take a look at the downstream code.

@tarsius

tarsius commented Dec 8, 2025

Copy link
Copy Markdown
Member

Which code-review fork are you using? (The original is known to be broken and unmaintained.)

@srnnkls

srnnkls commented Dec 8, 2025

Copy link
Copy Markdown
Author

Using my own based on the doomelpa fork.

tarsius added a commit that referenced this pull request Dec 14, 2025
Until the previous commit, `closql--remake-instance' even failed to
honor that setting, which made it impossible to feed an object,
which was created from data in the database, back into the database.

Closes #11.

Reported-by: Sören Nikolaus <soeren@getml.com>
@tarsius

tarsius commented Dec 14, 2025

Copy link
Copy Markdown
Member

I've just pushed a good version, 0efdf5f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants